/* reset.scss */

/* 1. 通用的 CSS 重置 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  font-size: 16px; /* 设置基础字体大小 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
  background: #f0f2f5;
}

/* 2. 移除默认列表样式 */
ul,
ol {
  list-style: none;
}

li {
  list-style-type: none;
}

/* 3. 移除链接下划线，设置默认颜色 */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 4. 图片默认占满父元素宽度 */
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 5. 表单元素基础样式 */
button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background-color: transparent;
  border: none;
  outline: none;
  padding: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical; /* 设置文本区域的可调整方向 */
}

/* 6. 表格基础样式 */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0;
  text-align: left;
  font-weight: normal;
}

/* 7. 设置通用的标题和段落间距 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* 8. 全局滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}
